﻿#region Directives

using System;

#endregion Directives

namespace ConnectIntegrationHub.WebService.Common
{
    public static class Extensions
    {
        #region Public Static Methods
        
        public static Boolean IsNullOrEmpty(this String s)
        {
            return String.IsNullOrEmpty(s);
        }

        public static String Value(this String s)
        {
            String result = null;
            if (!s.IsNullOrEmpty())
            {
                String sValue = s.Trim();
                if (sValue.Length > 0)
                {
                    result = sValue;
                }
            }
            return result;
        }

        public static String cleanText(this String s)
        {
            return Strings.cleanText(s);
        }

        public static String getLetters(this String s)
        {
            return Strings.getLetters(s);
        }

        public static String getNumbers(this String s)
        {
            return Strings.getNumbers(s);
        }

        public static String stripHTML(this String s)
        {
            return Strings.stripHTML(s);
        }

        public static String padToTheLeft(this String s, String paddingString, Int32 length)
        {
            return Strings.getPaddedLeftString(s, paddingString, length);
        }

        public static String padToTheRight(this String s, String paddingString, Int32 length)
        {
            return Strings.getPaddedRightString(s, paddingString, length);
        }

        #endregion Public Static Methods
    }
}